package com.leonzhangxf.ioc.bean.component;

import com.leonzhangxf.ioc.annotation.Autowired;
import com.leonzhangxf.ioc.annotation.Component;
import com.leonzhangxf.ioc.bean.component.inner.BeanCInterface;

/**
 * @author leonzhangxf
 */
@Component("beanBAlias")
public class BeanB implements BeanBInterface {

    private BeanCInterface beanCInterface;

    @Override
    public void printB() {
        System.out.println("print B");
        beanCInterface.printC();
    }

    @Autowired
    public void setBeanCInterface(BeanCInterface beanCInterface) {
        this.beanCInterface = beanCInterface;
    }
}
